home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / pine / imap-3.0 / non-ANSI / c-client / mail.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-05-24  |  19.0 KB  |  627 lines

  1. /*
  2.  * Program:    Mailbox Access routines
  3.  *
  4.  * Author:    Mark Crispin
  5.  *        Networks and Distributed Computing
  6.  *        Computing & Communications
  7.  *        University of Washington
  8.  *        Administration Building, AG-44
  9.  *        Seattle, WA  98195
  10.  *        Internet: MRC@CAC.Washington.EDU
  11.  *
  12.  * Date:    22 November 1989
  13.  * Last Edited:    24 May 1993
  14.  *
  15.  * Copyright 1993 by the University of Washington
  16.  *
  17.  *  Permission to use, copy, modify, and distribute this software and its
  18.  * documentation for any purpose and without fee is hereby granted, provided
  19.  * that the above copyright notice appears in all copies and that both the
  20.  * above copyright notice and this permission notice appear in supporting
  21.  * documentation, and that the name of the University of Washington not be
  22.  * used in advertising or publicity pertaining to distribution of the software
  23.  * without specific, written prior permission.  This software is made
  24.  * available "as is", and
  25.  * THE UNIVERSITY OF WASHINGTON DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
  26.  * WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT LIMITATION ALL IMPLIED
  27.  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND IN
  28.  * NO EVENT SHALL THE UNIVERSITY OF WASHINGTON BE LIABLE FOR ANY SPECIAL,
  29.  * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  30.  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, TORT
  31.  * (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, ARISING OUT OF OR IN CONNECTION
  32.  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  33.  *
  34.  */
  35.  
  36. /* Build parameters */
  37.  
  38. #define CACHEINCREMENT 100    /* cache growth increments */
  39. #define MAILTMPLEN 1024        /* size of a temporary buffer */
  40. #define MAXMESSAGESIZE 65000    /* MS-DOS: maximum text buffer size
  41.                  * other:  initial text buffer size */
  42. #define NUSERFLAGS 30        /* # of user flags (current servers 30 max) */
  43. #define BASEYEAR 1969        /* the year time began */
  44.  
  45.  
  46. /* Constants */
  47.  
  48. #define NIL 0            /* convenient name */
  49. #define T 1            /* opposite of NIL */
  50. #define LONGT (long) 1        /* long T */
  51.  
  52. #define WARN (long) 1        /* mm_log warning type */
  53. #define ERROR (long) 2        /* mm_log error type */
  54. #define PARSE (long) 3        /* mm_log parse error type */
  55.  
  56.  
  57. /* Open options */
  58.  
  59. #define OP_DEBUG (long) 1    /* debug protocol negotiations */
  60. #define OP_READONLY (long) 2    /* read-only open */
  61. #define OP_ANONYMOUS (long) 4    /* anonymous open of newsgroup */
  62. #define OP_SHORTCACHE (long) 8    /* short (elt-only) caching */
  63. #define OP_SILENT (long) 16    /* don't pass up events (internal use) */
  64. #define OP_PROTOTYPE (long) 32    /* return driver prototype */
  65. #define OP_HALFOPEN (long) 64    /* half-open (IMAP connect but no select) */
  66.  
  67.  
  68. /* Cache management function codes */
  69.  
  70. #define CH_INIT (long) 10    /* initialize cache */
  71. #define CH_SIZE (long) 11    /* (re-)size the cache */
  72. #define CH_MAKELELT (long) 20    /* return long elt, make if needed */
  73. #define CH_LELT (long) 21    /* return long elt if exists */
  74. #define CH_MAKEELT (long) 30    /* return short elt, make if needed */
  75. #define CH_ELT (long) 31    /* return short elt if exists */
  76. #define CH_FREE (long) 40    /* free space used by elt */
  77. #define CH_EXPUNGE (long) 45    /* delete elt pointer from list */
  78.  
  79.  
  80. /* Garbage collection flags */
  81.  
  82. #define GC_ELT (long) 1        /* message cache elements */
  83. #define GC_ENV (long) 2        /* envelopes and bodies */
  84. #define GC_TEXTS (long) 4    /* cached texts */
  85.  
  86. /* Message structures */
  87.  
  88.  
  89. /* Item in an address list */
  90.  
  91. #define ADDRESS struct mail_address
  92. ADDRESS {
  93.   char *personal;        /* personal name phrase */
  94.   char *adl;            /* at-domain-list source route */
  95.   char *mailbox;        /* mailbox name */
  96.   char *host;            /* domain name of mailbox's host */
  97.   char *error;            /* error in address from SMTP module */
  98.   ADDRESS *next;        /* pointer to next address in list */
  99. };
  100.  
  101.  
  102. /* Message envelope */
  103.  
  104. typedef struct mail_envelope {
  105.   char *remail;            /* remail header if any */
  106.   ADDRESS *return_path;        /* error return address */
  107.   char *date;            /* message composition date string */
  108.   ADDRESS *from;        /* originator address list */
  109.   ADDRESS *sender;        /* sender address list */
  110.   ADDRESS *reply_to;        /* reply address list */
  111.   char *subject;        /* message subject string */
  112.   ADDRESS *to;            /* primary recipient list */
  113.   ADDRESS *cc;            /* secondary recipient list */
  114.   ADDRESS *bcc;            /* blind secondary recipient list */
  115.   char *in_reply_to;        /* replied message ID */
  116.   char *message_id;        /* message ID */
  117.   char *newsgroups;        /* USENET newsgroups */
  118. } ENVELOPE;
  119.  
  120. /* Primary body types */
  121. /* If you change any of these you must also change body_types in rfc822.c */
  122.  
  123. extern const char *body_types[];/* defined body type strings */
  124.  
  125. #define TYPETEXT 0        /* unformatted text */
  126. #define TYPEMULTIPART 1        /* multiple part */
  127. #define TYPEMESSAGE 2        /* encapsulated message */
  128. #define TYPEAPPLICATION 3    /* application data */
  129. #define TYPEAUDIO 4        /* audio */
  130. #define TYPEIMAGE 5        /* static image */
  131. #define TYPEVIDEO 6        /* video */
  132. #define TYPEOTHER 7        /* unknown */
  133.  
  134.  
  135. /* Body encodings */
  136. /* If you change any of these you must also change body_encodings in rfc822.c
  137.  */
  138.  
  139.                 /* defined body encoding strings */
  140. extern const char *body_encodings[];
  141.  
  142. #define ENC7BIT 0        /* 7 bit SMTP semantic data */
  143. #define ENC8BIT 1        /* 8 bit SMTP semantic data */
  144. #define ENCBINARY 2        /* 8 bit binary data */
  145. #define ENCBASE64 3        /* base-64 encoded data */
  146. #define ENCQUOTEDPRINTABLE 4    /* human-readable 8-as-7 bit data */
  147. #define ENCOTHER 5        /* unknown */
  148.  
  149.  
  150. /* Body contents */
  151.  
  152. #define BINARY void
  153. #define BODY struct mail_body
  154. #define MESSAGE struct mail_body_message
  155. #define PARAMETER struct mail_body_parameter
  156. #define PART struct mail_body_part
  157.  
  158. /* Message content (ONLY for parsed messages) */
  159.  
  160. MESSAGE {
  161.   ENVELOPE *env;        /* message envelope */
  162.   BODY *body;            /* message body */
  163.   char *text;            /* message in RFC-822 form */
  164.   unsigned long offset;        /* offset of text from header */
  165. };
  166.  
  167.  
  168. /* Parameter list */
  169.  
  170. PARAMETER {
  171.   char *attribute;        /* parameter attribute name */
  172.   char *value;            /* parameter value */
  173.   PARAMETER *next;        /* next parameter in list */
  174. };
  175.  
  176.  
  177. /* Message body structure */
  178.  
  179. BODY {
  180.   unsigned short type;        /* body primary type */
  181.   unsigned short encoding;    /* body transfer encoding */
  182.   char *subtype;        /* subtype string */
  183.   PARAMETER *parameter;        /* parameter list */
  184.   char *id;            /* body identifier */
  185.   char *description;        /* body description */
  186.   union {            /* different ways of accessing contents */
  187.     unsigned char *text;    /* body text (+ enc. message in composing) */
  188.     BINARY *binary;        /* body binary */
  189.     PART *part;            /* body part list */
  190.     MESSAGE msg;        /* body encapsulated message (PARSE ONLY) */
  191.   } contents;
  192.   struct {
  193.     unsigned long lines;    /* size in lines */
  194.     unsigned long bytes;    /* size in bytes */
  195.     unsigned long ibytes;    /* internal size in bytes (drivers ONLY!!) */
  196.   } size;
  197. };
  198.  
  199.  
  200. /* Multipart content list */
  201.  
  202. PART {
  203.   BODY body;            /* body information for this part */
  204.   unsigned long offset;        /* offset from body origin */
  205.   PART *next;            /* next body part */
  206. };
  207.  
  208. /* Entry in the message cache array */
  209.  
  210. typedef struct message_cache {
  211.   unsigned long msgno;        /* message number */
  212.   /* The next 8 bytes is ordered in this way so that it will be reasonable even
  213.    * on a 36-bit machine.  Maybe someday I'll port this to TOPS-20.  ;-)
  214.    */
  215.             /* internal time/zone, system flags (4 bytes) */
  216.   unsigned int hours: 5;    /* hours (0-23) */
  217.   unsigned int minutes: 6;    /* minutes (0-59) */
  218.   unsigned int seconds: 6;    /* seconds (0-59) */
  219.   /* It may seem easier to have zhours be signed.  Unfortunately, a certain
  220.    * cretinous C compiler from a well-known software vendor in Redmond, WA
  221.    * does not allow signed bit fields.
  222.    */
  223.   unsigned int zoccident : 1;    /* non-zero if west of UTC */
  224.   unsigned int zhours : 4;    /* hours from UTC (0-12) */
  225.   unsigned int zminutes: 6;    /* minutes (0-59) */
  226.   unsigned int seen : 1;    /* system Seen flag */
  227.   unsigned int deleted : 1;    /* system Deleted flag */
  228.   unsigned int flagged : 1;     /* system Flagged flag */
  229.   unsigned int answered : 1;    /* system Answered flag */
  230.             /* flags, lock count (2 bytes) */
  231.   unsigned int xxxx : 1;    /* system flag reserved for future */
  232.   unsigned int yyyy : 1;    /* system flag reserved for future */
  233.   unsigned int recent : 1;    /* message is new as of this mailbox open */
  234.   unsigned int searched : 1;    /* message was searched */
  235.   unsigned int sequence : 1;    /* (driver use) message is in sequence */
  236.   unsigned int spare : 1;    /* reserved for use by main program */
  237.   unsigned int zzzz : 2;    /* reserved for future assignment */
  238.   unsigned int lockcount : 8;    /* non-zero if multiple references */
  239.             /* internal date (2 bytes) */
  240.   unsigned int day : 5;        /* day of month (1-31) */
  241.   unsigned int month : 4;    /* month of year (1-12) */
  242.   unsigned int year : 7;    /* year since 1969 (expires 2097) */
  243.   unsigned long user_flags;    /* user-assignable flags */
  244.   unsigned long rfc822_size;    /* # of bytes of message as raw RFC822 */
  245.   unsigned long data1;        /* (driver use) first data item */
  246.   unsigned long data2;        /* (driver use) second data item */
  247. } MESSAGECACHE;
  248.  
  249.  
  250. typedef struct long_cache {
  251.   MESSAGECACHE elt;
  252.   ENVELOPE *env;        /* pointer to message envelope */
  253.   BODY *body;            /* pointer to message body */
  254. } LONGCACHE;
  255.  
  256. /* String structure */
  257.  
  258. #define STRINGDRIVER struct string_driver
  259.  
  260. typedef struct mailstring {
  261.   void *data;            /* driver-dependent data */
  262.   unsigned long data1;        /* driver-dependent data */
  263.   unsigned long size;        /* total length of string */
  264.   char *chunk;            /* base address of chunk */
  265.   unsigned long chunksize;    /* size of chunk */
  266.   unsigned long offset;        /* offset of this chunk in base */
  267.   char *curpos;            /* current position in chunk */
  268.   unsigned long cursize;    /* number of bytes remaining in chunk */
  269.   STRINGDRIVER *dtb;        /* driver that handles this type of string */
  270. } STRING;
  271.  
  272.  
  273. /* Dispatch table for string driver */
  274.  
  275. STRINGDRIVER {
  276.                 /* initialize string driver */
  277.   void (*init) ();
  278.                 /* get next character in string */
  279.   char (*next) ();
  280.                 /* set position in string */
  281.   void (*setpos) ();
  282. };
  283.  
  284.  
  285. /* Stringstruct access routines */
  286.  
  287. #define INIT(s,d,data,size) ((*((s)->dtb = &d)->init) (s,data,size))
  288. #define SIZE(s) ((s)->size - GETPOS (s))
  289. #define CHR(s) (*(s)->curpos)
  290. #define SNX(s) (--(s)->cursize ? *(s)->curpos++ : (*(s)->dtb->next) (s))
  291. #define GETPOS(s) ((s)->offset + ((s)->curpos - (s)->chunk))
  292. #define SETPOS(s,i) (*(s)->dtb->setpos) (s,i)
  293.  
  294. /* Mail Access I/O stream */
  295.  
  296.  
  297. /* Structure for mail driver dispatch */
  298.  
  299. #define DRIVER struct driver    
  300.  
  301.  
  302. /* Mail I/O stream */
  303.  
  304. typedef struct mail_stream {
  305.   DRIVER *dtb;            /* dispatch table for this driver */
  306.   void *local;            /* pointer to driver local data */
  307.   char *mailbox;        /* mailbox name */
  308.   unsigned int lock : 1;    /* stream lock flag */
  309.   unsigned int debug : 1;    /* stream debug flag */
  310.   unsigned int silent : 1;    /* silent stream from Tenex */
  311.   unsigned int readonly : 1;    /* stream read-only flag */
  312.   unsigned int anonymous : 1;    /* stream anonymous access flag */
  313.   unsigned int scache : 1;    /* stream short cache flag */
  314.   unsigned int halfopen : 1;    /* stream half-open flag */
  315.   unsigned short use;        /* stream use count */
  316.   unsigned short sequence;    /* stream sequence */
  317.   unsigned long gensym;        /* generated tag */
  318.   unsigned long nmsgs;        /* # of associated msgs */
  319.   unsigned long recent;        /* # of recent msgs */
  320.   char *flagstring;        /* buffer of user keyflags */
  321.   char *user_flags[NUSERFLAGS];    /* pointers to user flags in bit order */
  322.   unsigned long cachesize;    /* size of message cache */
  323.   union {
  324.     void **c;            /* to get at the cache in general */
  325.     MESSAGECACHE **s;        /* message cache array */
  326.     LONGCACHE **l;        /* long cache array */
  327.   } cache;
  328.   unsigned long msgno;        /* message number of `current' message */
  329.   ENVELOPE *env;        /* pointer to `current' message envelope */
  330.   BODY *body;            /* pointer to `current' message body */
  331.   char *text;            /* pointer to `current' text */
  332. } MAILSTREAM;
  333.  
  334.  
  335. /* Mail I/O stream handle */
  336.  
  337. typedef struct mail_stream_handle {
  338.   MAILSTREAM *stream;        /* pointer to mail stream */
  339.   unsigned short sequence;    /* sequence of what we expect stream to be */
  340. } MAILHANDLE;
  341.  
  342. /* Mail driver dispatch */
  343.  
  344. DRIVER {
  345.   char *name;            /* driver name */
  346.   DRIVER *next;            /* next driver */
  347.                 /* mailbox is valid for us */
  348.   DRIVER *(*valid) ();
  349.                 /* manipulate driver parameters */
  350.   void *(*parameters) ();
  351.                 /* find mailboxes */
  352.   void (*find) ();
  353.                 /* find bboards */
  354.   void (*find_bboard) ();
  355.                 /* find all mailboxes */
  356.   void (*find_all) ();
  357.                 /* find all bboards */
  358.   void (*find_all_bboard) ();
  359.                 /* subscribe to mailbox */
  360.   long (*subscribe) ();
  361.                 /* unsubscribe from mailbox */
  362.   long (*unsubscribe) ();
  363.                 /* subscribe to bboard */
  364.   long (*subscribe_bboard) ();
  365.                 /* unsubscribe to bboard */
  366.   long (*unsubscribe_bboard) ();
  367.                 /* create mailbox */
  368.   long (*create) ();
  369.                 /* delete mailbox */
  370.   long (*delete) ();
  371.                 /* rename mailbox */
  372.   long (*rename) ();
  373.  
  374.                 /* open mailbox */
  375.   MAILSTREAM *(*open) ();
  376.                 /* close mailbox */
  377.   void (*close) ();
  378.                 /* fetch message "fast" attributes */
  379.   void (*fetchfast) ();
  380.                 /* fetch message flags */
  381.   void (*fetchflags) ();
  382.                 /* fetch message envelopes */
  383.   ENVELOPE *(*fetchstructure) ();
  384.                 /* fetch message header only */
  385.   char *(*fetchheader) ();
  386.                 /* fetch message body only */
  387.   char *(*fetchtext) ();
  388.                 /* fetch message body section */
  389.   char *(*fetchbody) ();
  390.                 /* set message flag */
  391.   void (*setflag) ();
  392.                 /* clear message flag */
  393.   void (*clearflag) ();
  394.                 /* search for message based on criteria */
  395.   void (*search) ();
  396.                 /* ping mailbox to see if still alive */
  397.   long (*ping) ();
  398.                 /* check for new messages */
  399.   void (*check) ();
  400.                 /* expunge deleted messages */
  401.   void (*expunge) ();
  402.                 /* copy messages to another mailbox */
  403.   long (*copy) ();
  404.                 /* move messages to another mailbox */
  405.   long (*move) ();
  406.                 /* append string message to mailbox */
  407.   long (*append) ();
  408.                 /* garbage collect stream */
  409.   void (*gc) ();
  410. };
  411.  
  412.  
  413. /* Parse results from mail_valid_net_parse */
  414.  
  415. #define MAXSRV 20
  416. typedef struct net_mailbox {
  417.   char host[MAILTMPLEN];    /* host name */
  418.   char mailbox[MAILTMPLEN];    /* mailbox name */
  419.   char service[MAXSRV+1];    /* service name */
  420.   int port;            /* TCP port number */
  421.   unsigned int anoflag : 1;    /* anonymous */
  422.   unsigned int bbdflag : 1;    /* bboard flag */
  423. } NETMBX;
  424.  
  425. /* Other symbols */
  426.  
  427. extern const char *months[];    /* month name strings */
  428.  
  429.  
  430. /* Jacket into external interfaces */
  431.  
  432. typedef long (*readfn_t) ();
  433. typedef char *(*mailgets_t) ();
  434. typedef void *(*mailcache_t) ();
  435.  
  436. extern char *lhostn;
  437. extern mailgets_t mailgets;
  438. extern mailcache_t mailcache;
  439.  
  440. /* Coddle certain compilers' 6-character symbol limitation */
  441.  
  442. #ifdef __COMPILER_KCC__
  443. #define mm_gets mmgets
  444. #define mm_cache mmcach
  445. #define mm_searched mmsrhd
  446. #define mm_exists mmexst
  447. #define mm_expunged mmexpn
  448. #define mm_notify mmntfy
  449. #define mm_mailbox mmmlbx
  450. #define mm_bboard mmbbrd
  451. #define mm_log mmlog
  452. #define mm_dlog mmdlog
  453. #define mm_login mmlogn
  454. #define mm_critical mmcrit
  455. #define mm_nocritical mmncrt
  456. #define mm_diskerror mmderr
  457. #define mm_fatal mmfatl
  458. #define mail_string mstr
  459. #define mail_string_init mstrin
  460. #define mail_string_next mstrnx
  461. #define mail_string_setpos mstrsp
  462. #define mail_link mllink
  463. #define mail_parameters mlparm
  464. #define mail_find mlfind
  465. #define mail_find_bboards mlfndb
  466. #define mail_find_all mlfnam
  467. #define mail_find_all_bboard mlfalb
  468. #define mail_valid mlvali
  469. #define mail_valid_net mlvaln
  470. #define mail_valid_net_parse mlvlnp
  471. #define mail_subscribe mlsub
  472. #define mail_unsubscribe mlusub
  473. #define mail_subscribe_bboard mlsubb
  474. #define mail_unsubscribe_bboard mlusbb
  475. #define mail_create mlcret
  476. #define mail_delete mldele
  477. #define mail_rename mlrena
  478. #define mail_open mlopen
  479. #define mail_close mlclse
  480. #define mail_makehandle mlmkha
  481. #define mail_free_handle mlfrha
  482. #define mail_stream mlstrm
  483. #define mail_fetchfast mlffst
  484. #define mail_fetchflags mlfflg
  485. #define mail_fetchstructure mlfstr
  486. #define mail_fetchheader mlfhdr
  487. #define mail_fetchtext mlftxt
  488. #define mail_fetchbody mlfbdy
  489. #define mail_fetchfrom mlffrm
  490. #define mail_fetchsubject mlfsub
  491.  
  492. #define mail_lelt mllelt
  493. #define mail_elt mlelt
  494. #define mail_setflag mlsflg
  495. #define mail_clearflag mlcflg
  496. #define mail_search mlsrch
  497. #define mail_ping mlping
  498. #define mail_check mlchck
  499. #define mail_expunge mlexpn
  500. #define mail_copy mlcopy
  501. #define mail_move mlmove
  502. #define mail_append mlappd
  503. #define mail_gc mailgc
  504. #define mail_date mldate
  505. #define mail_cdate mlcdat
  506. #define mail_parse_date mlpdat
  507. #define mail_searched mlsrch
  508. #define mail_exists mlexist
  509. #define mail_recent mlrcnt
  510. #define mail_expunged mlexst
  511. #define mail_lock mllock
  512. #define mail_unlock mlulck
  513. #define mail_debug mldbug
  514. #define mail_nodebug mlndbg
  515. #define mail_sequence mlsequ
  516. #define mail_newenvelope mlnenv
  517. #define mail_newaddr mlnadr
  518. #define mail_newbody mlnbod
  519. #define mail_initbody mlibod
  520. #define mail_newbody_parameter mlnbpr
  521. #define mail_newbody_part mlnbpt
  522. #define mail_free_body mlfrbd
  523. #define mail_free_body_data mlfrbt
  524. #define mail_free_body_parameter mlfrbr
  525. #define mail_free_body_part mlfrbp
  526. #define mail_free_cache mlfrch
  527. #define mail_free_elt mlfrel
  528. #define mail_free_envelope mlfren
  529. #define mail_free_address mlfrad
  530. #endif
  531.  
  532. /* Function prototypes */
  533.  
  534. void mm_searched  ();
  535. void mm_exists  ();
  536. void mm_expunged  ();
  537. void mm_notify  ();
  538. void mm_mailbox  ();
  539. void mm_bboard  ();
  540. void mm_log  ();
  541. void mm_dlog  ();
  542. void mm_login  ();
  543. void mm_critical  ();
  544. void mm_nocritical  ();
  545. long mm_diskerror  ();
  546. void mm_fatal  ();
  547. char *mm_gets  ();
  548. void *mm_cache  ();
  549.  
  550. extern STRINGDRIVER mail_string;
  551. void mail_string_init  ();
  552. char mail_string_next  ();
  553. void mail_string_setpos  ();
  554. void mail_link  ();
  555. void *mail_parameters  ();
  556. void mail_find  ();
  557. void mail_find_bboards  ();
  558. void mail_find_all  ();
  559. void mail_find_all_bboard  ();
  560. DRIVER *mail_valid  ();
  561. DRIVER *mail_valid_net  ();
  562. long mail_valid_net_parse  ();
  563. long mail_subscribe  ();
  564. long mail_unsubscribe  ();
  565. long mail_subscribe_bboard  ();
  566. long mail_unsubscribe_bboard  ();
  567. long mail_create  ();
  568. long mail_delete  ();
  569. long mail_rename  ();
  570. MAILSTREAM *mail_open  ();
  571. MAILSTREAM *mail_close  ();
  572. MAILHANDLE *mail_makehandle  ();
  573. void mail_free_handle  ();
  574. MAILSTREAM *mail_stream  ();
  575. void mail_fetchfast  ();
  576. void mail_fetchflags  ();
  577. ENVELOPE *mail_fetchstructure  ();
  578. char *mail_fetchheader  ();
  579. char *mail_fetchtext  ();
  580. char *mail_fetchbody  ();
  581. void mail_fetchfrom  ();
  582. void mail_fetchsubject  ();
  583. LONGCACHE *mail_lelt  ();
  584. MESSAGECACHE *mail_elt  ();
  585.  
  586. void mail_setflag  ();
  587. void mail_clearflag  ();
  588. void mail_search  ();
  589. long mail_ping  ();
  590. void mail_check  ();
  591. void mail_expunge  ();
  592. long mail_copy  ();
  593. long mail_move  ();
  594. long mail_append  ();
  595. void mail_gc  ();
  596. char *mail_date  ();
  597. char *mail_cdate  ();
  598. long mail_parse_date  ();
  599. void mail_searched  ();
  600. void mail_exists  ();
  601. void mail_recent  ();
  602. void mail_expunged  ();
  603. void mail_lock  ();
  604. void mail_unlock  ();
  605. void mail_debug  ();
  606. void mail_nodebug  ();
  607. long mail_sequence  ();
  608. ENVELOPE *mail_newenvelope  ();
  609. ADDRESS *mail_newaddr  ();
  610. BODY *mail_newbody  ();
  611. BODY *mail_initbody  ();
  612. PARAMETER *mail_newbody_parameter  ();
  613. PART *mail_newbody_part  ();
  614. void mail_free_body  ();
  615. void mail_free_body_data  ();
  616. void mail_free_body_parameter  ();
  617. void mail_free_body_part  ();
  618. void mail_free_cache  ();
  619. void mail_free_elt  ();
  620. void mail_free_lelt  ();
  621. void mail_free_envelope  ();
  622. void mail_free_address  ();
  623.  
  624. long sm_subscribe  ();
  625. long sm_unsubscribe  ();
  626. char *sm_read  ();
  627.